package swt.entity;

public class Sale {
	private String id;
	private String time;
	private String comp_id;
	private String tr_id;
	private String address;
	private float totalmoney;
	private float unitmoney;
	private int penum;

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	public String getComp_id() {
		return comp_id;
	}
	public void setComp_id(String comp_id) {
		this.comp_id = comp_id;
	}
	public String getTr_id() {
		return tr_id;
	}
	public void setTr_id(String tr_id) {
		this.tr_id = tr_id;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public float getTotalmoney() {
		return totalmoney;
	}
	public void setTotalmoney(float totalmoney) {
		this.totalmoney = totalmoney;
	}
	public float getUnitmoney() {
		if(this.totalmoney>0&&this.penum>0){
			unitmoney=totalmoney/penum;
			
		}
		return unitmoney;
	}
	public void setUnitmoney(float unitmoney) {
		this.unitmoney = unitmoney;
	}
	public int getPenum() {
		return penum;
	}
	public void setPenum(int penum) {
		this.penum = penum;
	}

}
